package com.bruan.D7_interfacedemo;

import java.util.ArrayList;

public class ClassManage {
    private ArrayList<Student> students = new ArrayList<>();
    private StudentOperator op = new StudentOperatorImpl2();


    public ClassManage(){
        students.add(new Student("迪丽热巴",'女',99));
        students.add(new Student("古力娜扎",'女',89));
        students.add(new Student("牛必哥",'女',59));
        students.add(new Student("大哥",'女',60));
    }

    //打印平均分
    public void printInfo(){
        op.printAllInfo(students);
    }

    //打印全部信息
    public void printScore(){
        op.printAverageScore(students);
    }

}
